﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
/*
 NickName:Irving
 Email:zhouyontao@outlook.com
 Date:2012年5月5日11:20:01
 */
namespace Common
{
    /// <summary>
    /// Log4日志记录
    /// </summary>
    public class Log4
    {
        /// <summary>
        /// 设置操作类的名字
        /// </summary>
        public static string repositoryName = string.Empty;
        private static log4net.ILog log = null;
        private readonly static object lockHelper = new object();
        public static log4net.ILog Log
        {
            get
            {
                if (log == null)
                {
                    lock (lockHelper)
                    {
                        if (log == null)

                            log = log4net.LogManager.GetLogger(repositoryName);
                    }
                }
                return log;
            }
        }
    }
}
